package com.naiterui.ehp.bs.b2c.order.entity;

import lombok.Data;

import javax.persistence.*;
import java.util.Date;

/**
 * <pre>
 *      退、换、补货操作日志
 * </pre>
 *
 * @author 王泽浩
 * @date 2019-02-19 10:27
 * @since 1.0.0
 */
@Data
@Entity
@Table(name = "e_return_order_operate_log")
public class ReturnOrderOperateLog implements java.io.Serializable {

    private static final long serialVersionUID = -3088010656080441816L;

    /**
     * 新增
     */
    public static final int OPERATE_ADD = 1;
    /**
     * 修改
     */
    public static final int OPERATE_UPDATE = 2;
    /**
     * 提交
     */
    public static final int OPERATE_SUBMIT = 3;
    /**
     * 审核
     */
    public static final int OPERATE_AUDIT = 4;
    /**
     * 反审
     */
    public static final int OPERATE_REPEAT = 5;
    /**
     * 作废
     */
    public static final int OPERATE_INVALID = 6;
    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    /**
     * 退、换、补货业务号: 关联  ReturnOrder.businessNo
     */
    @Column(name = "business_no")
    private String businessNo;


    /**
     * 操作: 1：新建 2：修改  3：删除  4：提交  5：审核  6：反审  7：作废
     */
    @Column(name = "operate")
    private String operate;

    /**
     * 备注
     */
    @Column(name = "remark")
    private String remark;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 创建人
     */
    @Column(name = "created_by")
    private String createdBy;

    /**
     * 修改时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    /**
     * 修改人
     */
    @Column(name = "changed_by")
    private String changedBy;

    /**
     * 乐观锁
     */
    @Version
    private Integer version;
}
